shouldNotBeEmpty

Verify that aa is not empty.

  1. void shouldNotBeEmpty(R rng, in string file = __FILE__, in size_t line = __LINE__)
  2. void shouldNotBeEmpty(in auto ref T aa, in string file = __FILE__, in size_t line = __LINE__)
    void
    shouldNotBeEmpty
    (
    T
    )
    (
    in auto ref T aa
    ,
    in string file = __FILE__
    ,
    in size_t line = __LINE__
    )
    if (
    isAssociativeArray!T
    )

Throws

UnitTestException on failure.

Examples

1 int[] ints;
2 string[] strings;
3 string[string] aa;
4 
5 ints ~= 1;
6 strings ~= "foo";
7 aa["foo"] = "bar";
8 
9 shouldNotBeEmpty(ints);
10 shouldNotBeEmpty(strings);
11 shouldNotBeEmpty(aa);

Meta